package com.nhjf.common.dao.impl;



import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.nhjf.common.dao.IbatisDao;



public class IbatisDaoImpl extends SqlMapClientDaoSupport implements IbatisDao {

	public List queryForList(String hql, Object o) {
       return getSqlMapClientTemplate().queryForList(hql, o);
	}

	public List queryForList(String hql) {
		return getSqlMapClientTemplate().queryForList(hql);
	}

	public Object queryForObject(String hql, Object o) {
		return getSqlMapClientTemplate().queryForObject(hql, o);
	}

	public Object queryForObject(String hql) {

		return getSqlMapClientTemplate().queryForObject(hql, null);
	}
	
	public int updateForObject(String hql, Object o){
	  return 	getSqlMapClientTemplate().update(hql, o);
	}
	/**插入方法返回插入成功后的主键值*/
	public Object InsertForObject(String hql, Object o){
	     return getSqlMapClientTemplate().insert(hql, o);
	}

	public int deleteForObject(String hql, Object o){
	    return 	getSqlMapClientTemplate().delete(hql, o);
	}
}